﻿<div>
    <MudChart ChartType="ChartType.Bar" ChartSeries="@Series" @bind-SelectedIndex="@_index" XAxisLabels="@XAxisLabels" Width="100%" Height="350px"></MudChart>
</div>

@code {
    public static string __description__ = "Single x-axis value with 3 bars";

    private int _index = -1; //default value cannot be 0 -> first selectedindex is 0.

    public List<ChartSeries> Series =
    [
        new() { Name = "United States", Data = [40] },
        new() { Name = "Germany", Data = [19] },
        new() { Name = "Sweden", Data = [8] }
    ];

    public string[] XAxisLabels = ["Jan"];
}